home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / New System Software Extensions / OpenDoc A6 / OpenDoc Parts Framework / OPF / Found / BCCollec / Support / BCStoreU.h < prev    next >
Encoding:
Text File  |  1994-04-21  |  745 b   |  35 lines  |  [TEXT/MPS ]

  1. //  The C++ Booch Components (Version 2.1)
  2. //  (C) Copyright 1990-1993 Grady Booch. All Rights Reserved.
  3. //
  4. //  BCStoreU.h
  5. //
  6. //  This file contains the declaration of the unmanaged storage
  7. //  management class utility
  8.  
  9. #ifndef BCSTOREU_H
  10. #define BCSTOREU_H 1
  11.  
  12. #include <stddef.h>
  13.  
  14. // Class utility providing an unmanaged memory allocation/deallocation protocol
  15.  
  16. class BC_CUnmanaged {
  17. public:
  18.  
  19.   static void* Allocate(size_t s) 
  20.     {return ::operator new(s);}
  21.   static void Deallocate(void* p, size_t) 
  22.     {::operator delete(p);}
  23.  
  24. private:
  25.  
  26.   BC_CUnmanaged() {}
  27.   BC_CUnmanaged(const BC_CUnmanaged&) {}
  28.   void operator=(const BC_CUnmanaged&) {}
  29.   void operator==(const BC_CUnmanaged&) {}
  30.   void operator!=(const BC_CUnmanaged&) {}
  31.  
  32. };
  33.  
  34. #endif
  35.